package com.kitty.record.kittyjava.javacollection;


import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;

/**
 * @Description
 * @Author SHEN
 * @Date 2021/1/24
 */
public class Test {

    public static void main(String[] args) {


        List<String> list = new ArrayList<>();

        new Thread(()->{
            for (int i = 0; i <100; i++) {
                list.add(String.valueOf(i));
            }
        }).start();

        new Thread(()->{
            for (int i = 100; i < 200; i++) {
                list.add(String.valueOf(i));
            }
        }).start();

        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        System.out.println("list = " + list);


    }






}
